<template>
    <div>
        <div class="outbox">
          <div @click="getGoto('1')">
            <img src="../../assets/helpServerIcon/shouhou .png" alt="">
            <p>申请售后</p>
          </div>
          <div @click="getGoto('2')">
            <img src="../../assets/helpServerIcon/cancel.png" alt="">
            <p>取消订单</p>
          </div>
          <div @click="getGoto('3')">
            <img src="../../assets/service.png" alt="">
            <p>售后服务</p>
          </div>
          <div @click="getGoto('4')">
            <img src="../../assets/helpServerIcon/kefu.png" alt="">
            <p>联系客服</p>
          </div>
        </div>
    </div>
</template>

<script>
    export default {
      name: "tabbar",
      methods:{
        getGoto: function (num) {
          var time = Date.parse(new Date())/1000;
          if(this._globe.isAndroid){
            if(window.android!=null&&typeof(window.android)!="undefined"){
              var a=window.android.callAppHelp(num);
              // return num;
            }else{
              if(num==1){
                this.$router.push({
                  path:'myOrder?active=4'
                })
              }else if(num==2){
                this.$router.push({
                  path:'myOrder?active=1'
                })
              }else if(num==3){
                this.$toast('改功能暂未开放')
              }else if(num==4){
                document.getElementById('YSF-BTN-HOLDER').onclick();
              }
            }
          }
          if(this._globe.isIos){
            if(window.webkit){
              window.webkit.messageHandlers.callAppHelp.postMessage(num)
            }else{
              if(num==1){
                this.$router.push({
                  path:'myOrder?active=4'
                })
              }else if(num==2){
                this.$router.push({
                  path:'myOrder?active=1'
                })
              }else if(num==3){
                this.$toast('改功能暂未开放')
              }else if(num==4){
                document.getElementById('YSF-BTN-HOLDER').onclick();
              }
            }

          }

        }
      }
    }

</script>

<style lang="scss">
.outbox{
  width:100vw;
  height:30.67vw;
  background:#fff;
  display:flex;
  div{
    flex:1;
    text-align:center;
    img{
      width:13.3vw;
      margin-top:5.33vw;
    }
  }
}
</style>
